home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / lispref.info-31 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  50.1 KB  |  1,155 lines

  1. This is Info file ../../info/lispref.info, produced by Makeinfo-1.63
  2. from the input file lispref.texi.
  3.  
  4.    Edition History:
  5.  
  6.    GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993 GNU
  7. Emacs Lisp Reference Manual Further Revised (v2.02), August 1993 Lucid
  8. Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
  9. XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
  10. GNU Emacs Lisp Reference Manual v2.4, June 1995 XEmacs Lisp
  11. Programmer's Manual (for 19.13) Third Edition, July 1995
  12.  
  13.    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software
  14. Foundation, Inc.  Copyright (C) 1994, 1995 Sun Microsystems, Inc.
  15. Copyright (C) 1995 Amdahl Corporation.  Copyright (C) 1995 Ben Wing.
  16.  
  17.    Permission is granted to make and distribute verbatim copies of this
  18. manual provided the copyright notice and this permission notice are
  19. preserved on all copies.
  20.  
  21.    Permission is granted to copy and distribute modified versions of
  22. this manual under the conditions for verbatim copying, provided that the
  23. entire resulting derived work is distributed under the terms of a
  24. permission notice identical to this one.
  25.  
  26.    Permission is granted to copy and distribute translations of this
  27. manual into another language, under the above conditions for modified
  28. versions, except that this permission notice may be stated in a
  29. translation approved by the Foundation.
  30.  
  31.    Permission is granted to copy and distribute modified versions of
  32. this manual under the conditions for verbatim copying, provided also
  33. that the section entitled "GNU General Public License" is included
  34. exactly as in the original, and provided that the entire resulting
  35. derived work is distributed under the terms of a permission notice
  36. identical to this one.
  37.  
  38.    Permission is granted to copy and distribute translations of this
  39. manual into another language, under the above conditions for modified
  40. versions, except that the section entitled "GNU General Public License"
  41. may be included in a translation approved by the Free Software
  42. Foundation instead of in the original English.
  43.  
  44. 
  45. File: lispref.info,  Node: Specifier Tag Functions,  Next: Specifier Instancing Functions,  Prev: Retrieving Specifications,  Up: Specifiers
  46.  
  47. Working With Specifier Tags
  48. ===========================
  49.  
  50.    A specifier tag set is an entity that is attached to an instantiator
  51. and can be used to restrict the scope of that instantiator to a
  52. particular device class or device type and/or to mark instantiators
  53. added by a particular package so that they can be later removed.
  54.  
  55.    A specifier tag set consists of a list of zero of more specifier
  56. tags, each of which is a symbol that is recognized by XEmacs as a tag.
  57. (The valid device types and device classes are always tags, as are any
  58. tags defined by `define-specifier-tag'.) It is called a "tag set" (as
  59. opposed to a list) because the order of the tags or the number of times
  60. a particular tag occurs does not matter.
  61.  
  62.    Each tag has a predicate associated with it, which specifies whether
  63. that tag applies to a particular device.  The tags which are device
  64. types and classes match devices of that type or class.  User-defined
  65. tags can have any predicate, or none (meaning that all devices match).
  66. When attempting to instance a specifier, a particular instantiator is
  67. only considered if the device of the domain being instanced over matches
  68. all tags in the tag set attached to that instantiator.
  69.  
  70.    Most of the time, a tag set is not specified, and the instantiator
  71. gets a null tag set, which matches all devices.
  72.  
  73.  - Function: valid-specifier-tag-p TAG
  74.      This function returns non-`nil' if TAG is a valid specifier tag.
  75.  
  76.  - Function: valid-specifier-tag-set-p TAG-SET
  77.      This function returns non-`nil' if TAG-SET is a valid specifier
  78.      tag set.
  79.  
  80.  - Function: canonicalize-tag-set TAG-SET
  81.      This function canonicalizes the given tag set.  Two canonicalized
  82.      tag sets can be compared with `equal' to see if they represent the
  83.      same tag set. (Specifically, canonicalizing involves sorting by
  84.      symbol name and removing duplicates.)
  85.  
  86.  - Function: device-matches-specifier-tag-set-p DEVICE TAG-SET
  87.      This function returns non-`nil' if DEVICE matches specifier tag
  88.      set TAG-SET.  This means that DEVICE matches each tag in the tag
  89.      set.
  90.  
  91.  - Function: define-specifier-tag TAG &optional PREDICATE
  92.      This function defines a new specifier tag.  If PREDICATE is
  93.      specified, it should be a function of one argument (a device) that
  94.      specifies whether the tag matches that particular device.  If
  95.      PREDICATE is omitted, the tag matches all devices.
  96.  
  97.      You can redefine an existing user-defined specifier tag.  However,
  98.      you cannot redefine the built-in specifier tags (the device types
  99.      and classes) or the symbols `nil', `t', `all', or `global'.
  100.  
  101.  - Function: device-matching-specifier-tag-list &optional DEVICE
  102.      This function returns a list of all specifier tags matching
  103.      DEVICE.  DEVICE defaults to the selected device if omitted.
  104.  
  105.  - Function: specifier-tag-list
  106.      This function returns a list of all currently-defined specifier
  107.      tags.  This includes the built-in ones (the device types and
  108.      classes).
  109.  
  110.  - Function: specifier-tag-predicate TAG
  111.      This function returns the predicate for the given specifier tag.
  112.  
  113. 
  114. File: lispref.info,  Node: Specifier Instancing Functions,  Next: Specifier Example,  Prev: Specifier Tag Functions,  Up: Specifiers
  115.  
  116. Functions for Instancing a Specifier
  117. ====================================
  118.  
  119.  - Function: specifier-instance SPECIFIER &optional DOMAIN DEFAULT
  120.           NO-FALLBACK
  121.      This function instantiates SPECIFIER (return its value) in DOMAIN.
  122.      If no instance can be generated for this domain, return DEFAULT.
  123.  
  124.      DOMAIN should be a window, frame, or device.  Other values that
  125.      are legal as a locale (e.g. a buffer) are not valid as a domain
  126.      because they do not provide enough information to identify a
  127.      particular device (see `valid-specifier-domain-p').  DOMAIN
  128.      defaults to the selected window if omitted.
  129.  
  130.      "Instantiating" a specifier in a particular domain means
  131.      determining the specifier's "value" in that domain.  This is
  132.      accomplished by searching through the specifications in the
  133.      specifier that correspond to all locales that can be derived from
  134.      the given domain, from specific to general.  In most cases, the
  135.      domain is an Emacs window.  In that case specifications are
  136.      searched for as follows:
  137.  
  138.        1. A specification whose locale is the window's buffer;
  139.  
  140.        2. A specification whose locale is the window itself;
  141.  
  142.        3. A specification whose locale is the window's frame;
  143.  
  144.        4. A specification whose locale is the window's frame's device;
  145.  
  146.        5. A specification whose locale is the symbol `global'.
  147.  
  148.      If all of those fail, then the C-code-provided fallback value for
  149.      this specifier is consulted (see `specifier-fallback').  If it is
  150.      an inst-list, then this function attempts to instantiate that list
  151.      just as when a specification is located in the first five steps
  152.      above.  If the fallback is a specifier, `specifier-instance' is
  153.      called recursively on this specifier and the return value used.
  154.      Note, however, that if the optional argument NO-FALLBACK is
  155.      non-`nil', the fallback value will not be consulted.
  156.  
  157.      Note that there may be more than one specification matching a
  158.      particular locale; all such specifications are considered before
  159.      looking for any specifications for more general locales.  Any
  160.      particular specification that is found may be rejected because it
  161.      is tagged to a particular device class (e.g. `color') or device
  162.      type (e.g. `x') or both and the device for the given domain does
  163.      not match this, or because the specification is not valid for the
  164.      device of the given domain (e.g.  the font or color name does not
  165.      exist for this particular X server).
  166.  
  167.      The returned value is dependent on the type of specifier.  For
  168.      example, for a font specifier (as returned by the `face-font'
  169.      function), the returned value will be a font-instance object.  For
  170.      images, the returned value will be a string, pixmap, or subwindow.
  171.  
  172.  - Function: specifier-instance-from-inst-list SPECIFIER DOMAIN
  173.           INST-LIST &optional DEFAULT
  174.      This function attempts to convert a particular inst-list into an
  175.      instance.  This attempts to instantiate INST-LIST in the given
  176.      DOMAIN, as if INST-LIST existed in a specification in SPECIFIER.
  177.      If the instantiation fails, DEFAULT is returned.  In most
  178.      circumstances, you should not use this function; use
  179.      `specifier-instance' instead.
  180.  
  181.  - Function: device-matches-specifier-tag-p DEVICE TAG
  182.      This function returns non-`nil' if DEVICE matches specifier tag
  183.      TAG.
  184.  
  185. 
  186. File: lispref.info,  Node: Specifier Example,  Next: Creating Specifiers,  Prev: Specifier Instancing Functions,  Up: Specifiers
  187.  
  188. Example of Specifier Usage
  189. ==========================
  190.  
  191.    Now let us present an example to clarify the theoretical discussions
  192. we have been through.  In this example, we will use the general
  193. specifier functions for clarity.  Keep in mind that many types of
  194. specifiers, and some other types of objects that are associated with
  195. specifiers (e.g. faces), provide convenience functions making it easier
  196. to work with objects of that type.
  197.  
  198.    Let us consider the background color of the default face.  A
  199. specifier is used to specify how that color will appear in different
  200. domains.  First, let's retrieve the specifier:
  201.  
  202.      (setq sp (face-property 'default background))
  203.          =>   #<color-specifier 0x3da>
  204.  
  205.      (specifier-specs sp)
  206.          =>   ((#<buffer "device.c"> (nil . "forest green"))
  207.                       (#<window on "Makefile" 0x8a2b> (nil . "hot pink"))
  208.                       (#<x-frame "emacs" 0x4ac> (nil . "puke orange")
  209.                             (nil . "moccasin"))
  210.                       (#<x-frame "VM" 0x4ac> (nil . "magenta"))
  211.               (global ((tty) . "cyan") (nil . "white"))
  212.                      )
  213.  
  214.    Then, say we want to determine what the background color of the
  215. default face is for the window currently displaying the buffer
  216. `*scratch*'.  We call
  217.  
  218.      (get-buffer-window "*scratch*")
  219.          => #<window on "*scratch*" 0x4ad>
  220.      (window-frame (get-buffer-window "*scratch*"))
  221.          => #<x-frame "emacs" 0x4ac>
  222.      (specifier-instance sp (get-buffer-window "*scratch*"))
  223.          => #<color-instance moccasin 47=(FFFF,E4E4,B5B5) 0x6309>
  224.  
  225.    Note that we passed a window to `specifier-instance', not a buffer.
  226. We cannot pass a buffer because a buffer by itself does not provide
  227. enough information.  The buffer might not be displayed anywhere at all,
  228. or could be displayed in many different frames on different devices.
  229.  
  230.    The result is arrived at like this:
  231.  
  232.   1. First, we look for a specification matching the buffer displayed
  233.      in the window, i.e. `*scratch'.  There are none, so we proceed.
  234.  
  235.   2. Then, we look for a specification matching the window itself.
  236.      Again, there are none.
  237.  
  238.   3. Then, we look for a specification matching the window's frame.  The
  239.      specification `(#<x-frame "emacs" 0x4ac> . "puke orange")' is
  240.      found.  We call the instantiation method for colors, passing it the
  241.      locale we were searching over (i.e. the window, in this case) and
  242.      the instantiator (`"puke orange"').  However, the particular device
  243.      which this window is on (let's say it's an X connection) doesn't
  244.      recognize the color `"puke orange"', so the specification is
  245.      rejected.
  246.  
  247.   4. So we continue looking for a specification matching the window's
  248.      frame.  We find `(#<x-frame "emacs" 0x4ac> . "moccasin")'.  Again,
  249.      we call the instantiation method for colors.  This time, the X
  250.      server our window is on recognizes the color `moccasin', and so the
  251.      instantiation method succeeds and returns a color instance.
  252.  
  253. 
  254. File: lispref.info,  Node: Creating Specifiers,  Next: Specifier Validation Functions,  Prev: Specifier Example,  Up: Specifiers
  255.  
  256. Creating New Specifier Objects
  257. ==============================
  258.  
  259.  - Function: make-specifier TYPE
  260.      This function creates a new specifier.
  261.  
  262.      A specifier is an object that can be used to keep track of a
  263.      property whose value can be per-buffer, per-window, per-frame, or
  264.      per-device, and can further be restricted to a particular
  265.      device-type or device-class.  Specifiers are used, for example,
  266.      for the various built-in properties of a face; this allows a face
  267.      to have different values in different frames, buffers, etc.  For
  268.      more information, see `specifier-instance', `specifier-specs', and
  269.      `add-spec-to-specifier'; or, for a detailed description of
  270.      specifiers, including how they are instantiated over a particular
  271.      domain (i.e. how their value in that domain is determined), see
  272.      the chapter on specifiers in the XEmacs Lisp Reference Manual.
  273.  
  274.      TYPE specifies the particular type of specifier, and should be one
  275.      of the symbols `generic', `integer', `natnum', `boolean', `color',
  276.      `font', `image', `face-boolean', or `toolbar'.
  277.  
  278.      For more information on particular types of specifiers, see the
  279.      functions `generic-specifier-p', `integer-specifier-p',
  280.      `natnum-specifier-p', `boolean-specifier-p', `color-specifier-p',
  281.      `font-specifier-p', `image-specifier-p',
  282.      `face-boolean-specifier-p', and `toolbar-specifier-p'.
  283.  
  284.  - Function: make-specifier-and-init TYPE SPEC-LIST &optional
  285.           DONT-CANONICALIZE
  286.      This function creates and initialize a new specifier.
  287.  
  288.      This is a front-end onto `make-specifier' that allows you to create
  289.      a specifier and add specs to it at the same time.  TYPE specifies
  290.      the specifier type.  SPEC-LIST supplies the specification(s) to be
  291.      added to the specifier. Normally, almost any reasonable
  292.      abbreviation of the full spec-list form is accepted, and is
  293.      converted to the full form; however, if optional argument
  294.      DONT-CANONICALIZE is non-`nil', this conversion is not performed,
  295.      and the SPEC-LIST must already be in full form.  See
  296.      `canonicalize-spec-list'.
  297.  
  298. 
  299. File: lispref.info,  Node: Specifier Validation Functions,  Next: Other Specification Functions,  Prev: Creating Specifiers,  Up: Specifiers
  300.  
  301. Functions for Checking the Validity of Specifier Components
  302. ===========================================================
  303.  
  304.  - Function: valid-specifier-domain-p DOMAIN
  305.      This function returns non-`nil' if DOMAIN is a valid specifier
  306.      domain.  A domain is used to instance a specifier (i.e. determine
  307.      the specifier's value in that domain).  Valid domains are a
  308.      window, frame, or device.  (`nil' is not valid.)
  309.  
  310.  - Function: valid-specifier-locale-p LOCALE
  311.      This function returns non-`nil' if LOCALE is a valid specifier
  312.      locale.  Valid locales are a device, a frame, a window, a buffer,
  313.      and `global'.  (`nil' is not valid.)
  314.  
  315.  - Function: valid-specifier-locale-type-p LOCALE-TYPE
  316.      Given a specifier LOCALE-TYPE, this function returns non-nil if it
  317.      is valid.  Valid locale types are the symbols `global', `device',
  318.      `frame', `window', and `buffer'. (Note, however, that in functions
  319.      that accept either a locale or a locale type, `global' is
  320.      considered an individual locale.)
  321.  
  322.  - Function: valid-specifier-type-p SPECIFIER-TYPE
  323.      Given a SPECIFIER-TYPE, this function returns non-`nil' if it is
  324.      valid.  Valid types are `generic', `integer', `boolean', `color',
  325.      `font', `image', `face-boolean', and `toolbar'.
  326.  
  327.  - Function: valid-specifier-tag-p TAG
  328.      This function returns non-`nil' if TAG is a valid specifier tag.
  329.  
  330.  - Function: valid-instantiator-p INSTANTIATOR SPECIFIER-TYPE
  331.      This function returns non-`nil' if INSTANTIATOR is valid for
  332.      SPECIFIER-TYPE.
  333.  
  334.  - Function: valid-inst-list-p INST-LIST TYPE
  335.      This function returns non-`nil' if INST-LIST is valid for
  336.      specifier type TYPE.
  337.  
  338.  - Function: valid-spec-list-p SPEC-LIST TYPE
  339.      This function returns non-`nil' if SPEC-LIST is valid for
  340.      specifier type TYPE.
  341.  
  342.  - Function: check-valid-instantiator INSTANTIATOR SPECIFIER-TYPE
  343.      This function signals an error if INSTANTIATOR is invalid for
  344.      SPECIFIER-TYPE.
  345.  
  346.  - Function: check-valid-inst-list INST-LIST TYPE
  347.      This function signals an error if INST-LIST is invalid for
  348.      specifier type TYPE.
  349.  
  350.  - Function: check-valid-spec-list SPEC-LIST TYPE
  351.      This function signals an error if SPEC-LIST is invalid for
  352.      specifier type TYPE.
  353.  
  354. 
  355. File: lispref.info,  Node: Other Specification Functions,  Prev: Specifier Validation Functions,  Up: Specifiers
  356.  
  357. Other Functions for Working with Specifications in a Specifier
  358. ==============================================================
  359.  
  360.  - Function: copy-specifier SPECIFIER &optional DEST LOCALE TAG-SET
  361.           EXACT-P HOW-TO-ADD
  362.      This function copies SPECIFIER to DEST, or creates a new one if
  363.      DEST is `nil'.
  364.  
  365.      If DEST is `nil' or omitted, a new specifier will be created and
  366.      the specifications copied into it.  Otherwise, the specifications
  367.      will be copied into the existing specifier in DEST.
  368.  
  369.      If LOCALE is `nil' or the symbol `all', all specifications will be
  370.      copied.  If LOCALE is a particular locale, the specification for
  371.      that particular locale will be copied.  If LOCALE is a locale
  372.      type, the specifications for all locales of that type will be
  373.      copied.  LOCALE can also be a list of locales, locale types,
  374.      and/or `all'; this is equivalent to calling `copy-specifier' for
  375.      each of the elements of the list.  See `specifier-spec-list' for
  376.      more information about LOCALE.
  377.  
  378.      Only instantiators where TAG-SET (a list of zero or more tags) is
  379.      a subset of (or possibly equal to) the instantiator's tag set are
  380.      copied.  (The default value of `nil' is a subset of all tag sets,
  381.      so in this case no instantiators will be screened out.) If EXACT-P
  382.      is non-`nil', however, TAG-SET must be equal to an instantiator's
  383.      tag set for the instantiator to be copied.
  384.  
  385.      Optional argument HOW-TO-ADD specifies what to do with existing
  386.      specifications in DEST.  If nil, then whichever locales or locale
  387.      types are copied will first be completely erased in DEST.
  388.      Otherwise, it is the same as in `add-spec-to-specifier'.
  389.  
  390.  - Function: remove-specifier SPECIFIER &optional LOCALE TAG-SET EXACT-P
  391.      This function removes specification(s) for SPECIFIER.
  392.  
  393.      If LOCALE is a particular locale (a buffer, window, frame, device,
  394.      or the symbol `global'), the specification for that locale will be
  395.      removed.
  396.  
  397.      If instead, LOCALE is a locale type (i.e. a symbol `buffer',
  398.      `window', `frame', or `device'), the specifications for all
  399.      locales of that type will be removed.
  400.  
  401.      If LOCALE is `nil' or the symbol `all', all specifications will be
  402.      removed.
  403.  
  404.      LOCALE can also be a list of locales, locale types, and/or `all';
  405.      this is equivalent to calling `remove-specifier' for each of the
  406.      elements in the list.
  407.  
  408.      Only instantiators where TAG-SET (a list of zero or more tags) is
  409.      a subset of (or possibly equal to) the instantiator's tag set are
  410.      removed.  (The default value of `nil' is a subset of all tag sets,
  411.      so in this case no instantiators will be screened out.) If EXACT-P
  412.      is non-`nil', however, TAG-SET must be equal to an instantiator's
  413.      tag set for the instantiator to be removed.
  414.  
  415.  - Function: map-specifier SPECIFIER FUNC &optional LOCALE MAPARG
  416.      This function applies FUNC to the specification(s) for LOCALE in
  417.      SPECIFIER.
  418.  
  419.      If LOCALE is a locale, FUNC will be called for that locale.  If
  420.      LOCALE is a locale type, FUNC will be mapped over all locales of
  421.      that type.  If LOCALE is `nil' or the symbol `all', FUNC will be
  422.      mapped over all locales in SPECIFIER.
  423.  
  424.      FUNC is called with four arguments: the SPECIFIER, the locale
  425.      being mapped over, the inst-list for that locale, and the optional
  426.      MAPARG.  If any invocation of FUNC returns non-`nil', the mapping
  427.      will stop and the returned value becomes the value returned from
  428.      `map-specifier'.  Otherwise, `map-specifier' returns `nil'.
  429.  
  430.  - Function: specifier-locale-type-from-locale LOCALE
  431.      Given a specifier LOCALE, this function returns its type.
  432.  
  433. 
  434. File: lispref.info,  Node: Faces and Window-System Objects,  Next: Glyphs,  Prev: Specifiers,  Up: Top
  435.  
  436. Faces and Window-System Objects
  437. *******************************
  438.  
  439. * Menu:
  440.  
  441. * Faces::        Controlling the way text looks.
  442. * Fonts::        Controlling the typeface of text.
  443. * Colors::        Controlling the color of text and pixmaps.
  444.  
  445. 
  446. File: lispref.info,  Node: Faces,  Next: Fonts,  Up: Faces and Window-System Objects
  447.  
  448. Faces
  449. =====
  450.  
  451.    A "face" is a named collection of graphical properties: font,
  452. foreground color, background color, background pixmap, optional
  453. underlining, and (on TTY devices) whether the text is to be highlighted,
  454. dimmed, blinking, or displayed in reverse video.  Faces control the
  455. display of text on the screen.  Every face has a name, which is a symbol
  456. such as `default' or `modeline'.
  457.  
  458.    Each built-in property of a face is controlled using a specifier,
  459. which allows it to have separate values in particular buffers, frames,
  460. windows, and devices and to further vary according to device type (X or
  461. TTY) and device class (color, mono, or grayscale).  *Note Specifiers::
  462. for more information.
  463.  
  464.    The face named `default' is used for ordinary text.  The face named
  465. `modeline' is used for displaying the modeline.  The face named
  466. `highlight' is used for highlighted extents (*note Extents::.).  The
  467. faces named `left-margin' and `right-margin' are used for the left and
  468. right margin areas, respectively (*note Annotations::.).  The face
  469. named `zmacs-region' is used for the highlighted region between point
  470. and mark.
  471.  
  472. * Menu:
  473.  
  474. * Merging Faces::        How XEmacs decides which face to use
  475.                   for a character.
  476. * Basic Face Functions::    How to define and examine faces.
  477. * Face Properties::        How to access and modify a face's properties.
  478. * Face Convenience Functions::    Convenience functions for accessing
  479.                   particular properties of a face.
  480. * Other Face Display Functions:: Other functions pertaining to how a
  481.                   a face appears.
  482.  
  483. 
  484. File: lispref.info,  Node: Merging Faces,  Next: Basic Face Functions,  Up: Faces
  485.  
  486. Merging Faces for Display
  487. -------------------------
  488.  
  489.    Here are all the ways to specify which face to use for display of
  490. text:
  491.  
  492.    * With defaults.  Each frame has a "default face", which is used for
  493.      all text that doesn't somehow specify another face.  The face named
  494.      `default' applies to the text area, while the faces `left-margin'
  495.      and `right-margin' apply to the left and right margin areas.
  496.  
  497.    * With text properties.  A character may have a `face' property; if
  498.      so, it's displayed with that face. (Text properties are actually
  499.      implemented in terms of extents.) *Note Text Properties::.
  500.  
  501.    * With extents.  An extent may have a `face' property, which applies
  502.      to all the text covered by the extent; in addition, if the
  503.      `highlight' property is set, the `highlight' property applies when
  504.      the mouse moves over the extent or if the extent is explicitly
  505.      highlighted.  *Note Extents::.
  506.  
  507.    * With annotations.  Annotations that are inserted into a buffer can
  508.      specify their own face. (Annotations are actually implemented in
  509.      terms of extents.) *Note Annotations::.
  510.  
  511.    If these various sources together specify more than one face for a
  512. particular character, XEmacs merges the properties of the various faces
  513. specified.  Extents, text properties, and annotations all use the same
  514. underlying representation (as extents).  When multiple extents cover one
  515. character, an extent with higher priority overrides those with lower
  516. priority.  *Note Extents::.  If no extent covers a particular character,
  517. the `default' face is used.
  518.  
  519.    If a background pixmap is specified, it determines what will be
  520. displayed in the background of text characters.  If the background
  521. pixmap is actually a pixmap, with its colors specified, those colors are
  522. used; if it is a bitmap, the face's foreground and background colors are
  523. used to color it.
  524.  
  525. 
  526. File: lispref.info,  Node: Basic Face Functions,  Next: Face Properties,  Prev: Merging Faces,  Up: Faces
  527.  
  528. Basic Functions for Working with Faces
  529. --------------------------------------
  530.  
  531.    The properties a face can specify include the font, the foreground
  532. color, the background color, the background pixmap, the underlining,
  533. the display table, and (for TTY devices) whether the text is to be
  534. highlighted, dimmed, blinking, or displayed in reverse video.  The face
  535. can also leave these unspecified, causing them to assume the value of
  536. the corresponding property of the `default' face.
  537.  
  538.    Here are the basic primitives for working with faces.
  539.  
  540.  - Function: make-face NAME &optional DOC-STRING TEMPORARY
  541.      This function defines and returns a new face named NAME, initially
  542.      with all properties unspecified.  It does nothing if there is
  543.      already a face named NAME.  Optional argument DOC-STRING specifies
  544.      an explanatory string used for descriptive purposes.  If optional
  545.      argument TEMPORARY is non-`nil', the face will automatically
  546.      disappear when there are no more references to it anywhere in text
  547.      or Lisp code (otherwise, the face will continue to exist
  548.      indefinitely even if it is not used).
  549.  
  550.  - Function: face-list &optional TEMPORARY
  551.      This function returns a list of the names of all defined faces.  If
  552.      TEMPORARY is `nil', only the permanent faces are included.  If it
  553.      is `t', only the temporary faces are included.  If it is any other
  554.      non-`nil' value both permanent and temporary are included.
  555.  
  556.  - Function: facep OBJECT
  557.      This function returns whether the given object is a face.
  558.  
  559.  - Function: copy-face OLD-FACE NEW-NAME &optional LOCALE HOW-TO-ADD
  560.      This function defines a new face named NEW-NAME which is a copy of
  561.      the existing face named OLD-FACE.  If there is already a face
  562.      named NEW-NAME, then it alters the face to have the same
  563.      properties as OLD-FACE.  LOCALE and HOW-TO-ADD let you copy just
  564.      parts of the old face rather than the whole face, and are as in
  565.      `copy-specifier' (*note Specifiers::.).
  566.  
  567. 
  568. File: lispref.info,  Node: Face Properties,  Next: Face Convenience Functions,  Prev: Basic Face Functions,  Up: Faces
  569.  
  570. Face Properties
  571. ---------------
  572.  
  573.    You can examine and modify the properties of an existing face with
  574. the following functions.
  575.  
  576.    The following symbols have predefined meanings:
  577.  
  578. `foreground'
  579.      The foreground color of the face.
  580.  
  581. `background'
  582.      The background color of the face.
  583.  
  584. `font'
  585.      The font used to display text covered by this face.
  586.  
  587. `display-table'
  588.      The display table of the face.
  589.  
  590. `background-pixmap'
  591.      The pixmap displayed in the background of the face.  Only used by
  592.      faces on X devices.
  593.  
  594. `underline'
  595.      Underline all text covered by this face.
  596.  
  597. `highlight'
  598.      Highlight all text covered by this face.  Only used by faces on TTY
  599.      devices.
  600.  
  601. `dim'
  602.      Dim all text covered by this face.  Only used by faces on TTY
  603.      devices.
  604.  
  605. `blinking'
  606.      Blink all text covered by this face.  Only used by faces on TTY
  607.      devices.
  608.  
  609. `reverse'
  610.      Reverse the foreground and background colors.  Only used by faces
  611.      on TTY devices.
  612.  
  613. `doc-string'
  614.      Description of what the face's normal use is.  NOTE: This is not a
  615.      specifier, unlike all the other built-in properties, and cannot
  616.      contain locale-specific values.
  617.  
  618.  - Function: set-face-property FACE PROPERTY VALUE &optional LOCALE TAG
  619.           HOW-TO-ADD
  620.      This function changes a property of a FACE.
  621.  
  622.      For built-in properties, the actual value of the property is a
  623.      specifier and you cannot change this; but you can change the
  624.      specifications within the specifier, and that is what this
  625.      function will do.  For user-defined properties, you can use this
  626.      function to either change the actual value of the property or, if
  627.      this value is a specifier, change the specifications within it.
  628.  
  629.      If PROPERTY is a built-in property, the specifications to be added
  630.      to this property can be supplied in many different ways:
  631.  
  632.           If VALUE is a simple instantiator (e.g. a string naming a
  633.           font or color) or a list of instantiators, then the
  634.           instantiator(s) will be added as a specification of the
  635.           property for the given LOCALE (which defaults to `global' if
  636.           omitted).
  637.  
  638.           If VALUE is a list of specifications (each of which is a cons
  639.           of a locale and a list of instantiators), then LOCALE must be
  640.           `nil' (it does not make sense to explicitly specify a locale
  641.           in this case), and specifications will be added as given.
  642.  
  643.           If VALUE is a specifier (as would be returned by
  644.           `face-property' if no LOCALE argument is given), then some or
  645.           all of the specifications in the specifier will be added to
  646.           the property.  In this case, the function is really
  647.           equivalent to `copy-specifier' and LOCALE has the same
  648.           semantics (if it is a particular locale, the specification
  649.           for the locale will be copied; if a locale type,
  650.           specifications for all locales of that type will be copied;
  651.           if `nil' or `all', then all specifications will be copied).
  652.  
  653.      HOW-TO-ADD should be either `nil' or one of the symbols `prepend',
  654.      `append', `remove-tag-set-prepend', `remove-tag-set-append',
  655.      `remove-locale', `remove-locale-type', or `remove-all'.  See
  656.      `copy-specifier' and `add-spec-to-specifier' for a description of
  657.      what each of these means.  Most of the time, you do not need to
  658.      worry about this argument; the default behavior usually is fine.
  659.  
  660.      In general, it is OK to pass an instance object (e.g. as returned
  661.      by `face-property-instance') as an instantiator in place of an
  662.      actual instantiator.  In such a case, the instantiator used to
  663.      create that instance object will be used (for example, if you set
  664.      a font-instance object as the value of the `font' property, then
  665.      the font name used to create that object will be used instead).
  666.      If some cases, however, doing this conversion does not make sense,
  667.      and this will be noted in the documentation for particular types
  668.      of instance objects.
  669.  
  670.      If PROPERTY is not a built-in property, then this function will
  671.      simply set its value if LOCALE is `nil'.  However, if LOCALE is
  672.      given, then this function will attempt to add VALUE as the
  673.      instantiator for the given LOCALE, using `add-spec-to-specifier'.
  674.      If the value of the property is not a specifier, it will
  675.      automatically be converted into a `generic' specifier.
  676.  
  677.  - Function: face-property FACE PROPERTY &optional LOCALE
  678.      This function returns FACE's value of the given PROPERTY.
  679.  
  680.      If LOCALE is omitted, the FACE's actual value for PROPERTY will be
  681.      returned.  For built-in properties, this will be a specifier
  682.      object of a type appropriate to the property (e.g. a font or color
  683.      specifier).  For other properties, this could be anything.
  684.  
  685.      If LOCALE is supplied, then instead of returning the actual value,
  686.      the specification(s) for the given locale or locale type will be
  687.      returned.  This will only work if the actual value of PROPERTY is
  688.      a specifier (this will always be the case for built-in properties,
  689.      but not or not may apply to user-defined properties).  If the
  690.      actual value of PROPERTY is not a specifier, this value will
  691.      simply be returned regardless of LOCALE.
  692.  
  693.      The return value will be a list of instantiators (e.g. strings
  694.      specifying a font or color name), or a list of specifications,
  695.      each of which is a cons of a locale and a list of instantiators.
  696.      Specifically, if LOCALE is a particular locale (a buffer, window,
  697.      frame, device, or `global'), a list of instantiators for that
  698.      locale will be returned.  Otherwise, if LOCALE is a locale type
  699.      (one of the symbols `buffer', `window', `frame', or `device'), the
  700.      specifications for all locales of that type will be returned.
  701.      Finally, if LOCALE is `all', the specifications for all locales of
  702.      all types will be returned.
  703.  
  704.      The specifications in a specifier determine what the value of
  705.      PROPERTY will be in a particular "domain" or set of circumstances,
  706.      which is typically a particular Emacs window along with the buffer
  707.      it contains and the frame and device it lies within.  The value is
  708.      derived from the instantiator associated with the most specific
  709.      locale (in the order buffer, window, frame, device, and `global')
  710.      that matches the domain in question.  In other words, given a
  711.      domain (i.e. an Emacs window, usually), the specifier for PROPERTY
  712.      will first be searched for a specification whose locale is the
  713.      buffer contained within that window; then for a specification
  714.      whose locale is the window itself; then for a specification whose
  715.      locale is the frame that the window is contained within; etc.  The
  716.      first instantiator that is valid for the domain (usually this
  717.      means that the instantiator is recognized by the device [i.e. the
  718.      X server or TTY device] that the domain is on).  The function
  719.      `face-property-instance' actually does all this, and is used to
  720.      determine how to display the face.
  721.  
  722.  - Function: face-property-instance FACE PROPERTY &optional DOMAIN
  723.           DEFAULT NO-FALLBACK
  724.      This function returns the instance of FACE's PROPERTY in the
  725.      specified DOMAIN.
  726.  
  727.      Under most circumstances, DOMAIN will be a particular window, and
  728.      the returned instance describes how the specified property
  729.      actually is displayed for that window and the particular buffer in
  730.      it.  Note that this may not be the same as how the property
  731.      appears when the buffer is displayed in a different window or
  732.      frame, or how the property appears in the same window if you
  733.      switch to another buffer in that window; and in those cases, the
  734.      returned instance would be different.
  735.  
  736.      The returned instance will typically be a color-instance,
  737.      font-instance, or pixmap-instance object, and you can query it
  738.      using the appropriate object-specific functions.  For example, you
  739.      could use `color-instance-rgb-components' to find out the RGB
  740.      (red, green, and blue) components of how the `background' property
  741.      of the `highlight' face is displayed in a particular window.  The
  742.      results might be different from the results you would get for
  743.      another window (perhaps the user specified a different color for
  744.      the frame that window is on; or perhaps the same color was
  745.      specified but the window is on a different X server, and that X
  746.      server has different RGB values for the color from this one).
  747.  
  748.      DOMAIN defaults to the selected window if omitted.
  749.  
  750.      DOMAIN can be a frame or device, instead of a window.  The value
  751.      returned for a such a domain is used in special circumstances when
  752.      a more specific domain does not apply; for example, a frame value
  753.      might be used for coloring a toolbar, which is conceptually
  754.      attached to a frame rather than a particular window.  The value is
  755.      also useful in determining what the value would be for a
  756.      particular window within the frame or device, if it is not
  757.      overridden by a more specific specification.
  758.  
  759.      If PROPERTY does not name a built-in property, its value will
  760.      simply be returned unless it is a specifier object, in which case
  761.      it will be instanced using `specifier-instance'.
  762.  
  763.      Optional arguments DEFAULT and NO-FALLBACK are the same as in
  764.      `specifier-instance'.  *Note Specifiers::.
  765.  
  766. 
  767. File: lispref.info,  Node: Face Convenience Functions,  Next: Other Face Display Functions,  Prev: Face Properties,  Up: Faces
  768.  
  769. Face Convenience Functions
  770. --------------------------
  771.  
  772.  - Function: set-face-foreground FACE COLOR &optional LOCALE TAG
  773.           HOW-TO-ADD
  774.  - Function: set-face-background FACE COLOR &optional LOCALE TAG
  775.           HOW-TO-ADD
  776.      These functions set the foreground (respectively, background)
  777.      color of face FACE to COLOR.  The argument COLOR should be a
  778.      string (the name of a color) or a color object as returned by
  779.      `make-color' (*note Colors::.).
  780.  
  781.  - Function: set-face-background-pixmap FACE PIXMAP &optional LOCALE
  782.           TAG HOW-TO-ADD
  783.      This function sets the background pixmap of face FACE to PIXMAP.
  784.      The argument PIXMAP should be a string (the name of a bitmap or
  785.      pixmap file; the directories listed in the variable
  786.      `x-bitmap-file-path' will be searched) or a glyph object as
  787.      returned by `make-glyph' (*note Glyphs::.).  The argument may also
  788.      be a list of the form `(WIDTH HEIGHT DATA)' where WIDTH and HEIGHT
  789.      are the size in pixels, and DATA is a string, containing the raw
  790.      bits of the bitmap.
  791.  
  792.  - Function: set-face-font FACE FONT &optional LOCALE TAG HOW-TO-ADD
  793.      This function sets the font of face FACE.  The argument FONT
  794.      should be a string or a font object as returned by `make-font'
  795.      (*note Fonts::.).
  796.  
  797.  - Function: set-face-underline-p FACE UNDERLINE-P &optional LOCALE TAG
  798.           HOW-TO-ADD
  799.      This function sets the underline property of face FACE.
  800.  
  801.  - Function: face-foreground FACE &optional LOCALE
  802.  - Function: face-background FACE &optional LOCALE
  803.      These functions return the foreground (respectively, background)
  804.      color specifier of face FACE.  *Note Colors::.
  805.  
  806.  - Function: face-background-pixmap FACE &optional LOCALE
  807.      This function return the background-pixmap glyph object of face
  808.      FACE.
  809.  
  810.  - Function: face-font FACE &optional LOCALE
  811.      This function returns the font specifier of face FACE.  (Note:
  812.      This is not the same as the function `face-font' in FSF Emacs.)
  813.      *Note Fonts::.
  814.  
  815.  - Function: face-font-name FACE &optional DOMAIN
  816.      This function returns the name of the font of face FACE, or `nil'
  817.      if it is unspecified.  This is basically equivalent to `(font-name
  818.      (face-font FACE) DOMAIN)' except that it does not cause an error
  819.      if FACE's font is `nil'. (This function is named `face-font' in
  820.      FSF Emacs.)
  821.  
  822.  - Function: face-underline-p FACE &optional LOCALE
  823.      This function returns the underline property of face FACE.
  824.  
  825.  - Function: face-foreground-instance FACE &optional DOMAIN
  826.  - Function: face-background-instance FACE &optional DOMAIN
  827.      These functions return the foreground (respectively, background)
  828.      color specifier of face FACE.  *Note Colors::.
  829.  
  830.  - Function: face-background-pixmap-instance FACE &optional DOMAIN
  831.      This function return the background-pixmap glyph object of face
  832.      FACE.
  833.  
  834.  - Function: face-font-instance FACE &optional DOMAIN
  835.      This function returns the font specifier of face FACE.  *Note
  836.      Fonts::.
  837.  
  838. 
  839. File: lispref.info,  Node: Other Face Display Functions,  Prev: Face Convenience Functions,  Up: Faces
  840.  
  841. Other Face Display Functions
  842. ----------------------------
  843.  
  844.  - Function: invert-face FACE &optional LOCALE
  845.      Swap the foreground and background colors of face FACE.  If the
  846.      face doesn't specify both foreground and background, then its
  847.      foreground and background are set to the default background and
  848.      foreground.
  849.  
  850.  - Function: face-equal FACE1 FACE2 &optional DOMAIN
  851.      This returns `t' if the faces FACE1 and FACE2 will display in the
  852.      same way.  DOMAIN is as in `face-property-instance'.
  853.  
  854.  - Function: face-differs-from-default-p FACE &optional DOMAIN
  855.      This returns `t' if the face FACE displays differently from the
  856.      default face.  DOMAIN is as in `face-property-instance'.
  857.  
  858. 
  859. File: lispref.info,  Node: Fonts,  Next: Colors,  Prev: Faces,  Up: Faces and Window-System Objects
  860.  
  861. Fonts
  862. =====
  863.  
  864.    This section describes how to work with font specifier and font
  865. instance objects, which encapsulate fonts in the window system.
  866.  
  867. * Menu:
  868.  
  869. * Font Specifiers::        Specifying how a font will appear.
  870. * Font Instances::        What a font specifier gets instanced as.
  871. * Font Instance Names::        The name of a font instance.
  872. * Font Instance Size::        The size of a font instance.
  873. * Font Instance Characteristics:: Display characteristics of font instances.
  874. * Font Convenience Functions::    Convenience functions that automatically
  875.                   instance and retrieve the properties
  876.                   of a font specifier.
  877.  
  878. 
  879. File: lispref.info,  Node: Font Specifiers,  Next: Font Instances,  Up: Fonts
  880.  
  881. Font Specifiers
  882. ---------------
  883.  
  884.  - Function: font-specifier-p OBJECT
  885.      This predicate returns `t' if OBJECT is a font specifier, and
  886.      `nil' otherwise.
  887.  
  888. 
  889. File: lispref.info,  Node: Font Instances,  Next: Font Instance Names,  Prev: Font Specifiers,  Up: Fonts
  890.  
  891. Font Instances
  892. --------------
  893.  
  894.  - Function: font-instance-p OBJECT
  895.      This predicate returns `t' if OBJECT is a font instance, and `nil'
  896.      otherwise.
  897.  
  898.  - Function: make-font-instance NAME &optional DEVICE NOERROR
  899.      This function creates a new font-instance object of the specified
  900.      name.  DEVICE specifies the device this object applies to and
  901.      defaults to the selected device.  An error is signalled if the
  902.      font is unknown or cannot be allocated; however, if NOERROR is
  903.      non-`nil', `nil' is simply returned in this case.
  904.  
  905.      The returned object is a normal, first-class lisp object.  The way
  906.      you "deallocate" the font is the way you deallocate any other lisp
  907.      object: you drop all pointers to it and allow it to be garbage
  908.      collected.  When these objects are GCed, the underlying X data is
  909.      deallocated as well.
  910.  
  911. 
  912. File: lispref.info,  Node: Font Instance Names,  Next: Font Instance Size,  Prev: Font Instances,  Up: Fonts
  913.  
  914. Font Instance Names
  915. -------------------
  916.  
  917.  - Function: list-fonts PATTERN &optional DEVICE
  918.      This function returns a list of font names matching the given
  919.      pattern.  DEVICE specifies which device to search for names, and
  920.      defaults to the currently selected device.
  921.  
  922.  - Function: font-instance-name FONT-INSTANCE
  923.      This function returns the name used to allocate FONT-INSTANCE.
  924.  
  925.  - Function: font-instance-truename FONT-INSTANCE
  926.      This function returns the canonical name of the given font
  927.      instance.  Font names are patterns which may match any number of
  928.      fonts, of which the first found is used.  This returns an
  929.      unambiguous name for that font (but not necessarily its only
  930.      unambiguous name).
  931.  
  932. 
  933. File: lispref.info,  Node: Font Instance Size,  Next: Font Instance Characteristics,  Prev: Font Instance Names,  Up: Fonts
  934.  
  935. Font Instance Size
  936. ------------------
  937.  
  938.  - Function: x-font-size FONT
  939.      This function returns the nominal size of the given font.  This is
  940.      done by parsing its name, so it's likely to lose.  X fonts can be
  941.      specified (by the user) in either pixels or 10ths of points, and
  942.      this returns the first one it finds, so you have to decide which
  943.      units the returned value is measured in yourself ...
  944.  
  945.  - Function: x-find-larger-font FONT &optional DEVICE
  946.      This function loads a new, slightly larger version of the given
  947.      font (or font name).  Returns the font if it succeeds, `nil'
  948.      otherwise.  If scalable fonts are available, this returns a font
  949.      which is 1 point larger.  Otherwise, it returns the next larger
  950.      version of this font that is defined.
  951.  
  952.  - Function: x-find-smaller-font FONT &optional DEVICE
  953.      This function loads a new, slightly smaller version of the given
  954.      font (or font name).  Returns the font if it succeeds, `nil'
  955.      otherwise.  If scalable fonts are available, this returns a font
  956.      which is 1 point smaller.  Otherwise, it returns the next smaller
  957.      version of this font that is defined.
  958.  
  959. 
  960. File: lispref.info,  Node: Font Instance Characteristics,  Next: Font Convenience Functions,  Prev: Font Instance Size,  Up: Fonts
  961.  
  962. Font Instance Characteristics
  963. -----------------------------
  964.  
  965.  - Function: font-instance-properties FONT
  966.      This function returns the properties (an alist or `nil') of
  967.      FONT-INSTANCE.
  968.  
  969.  - Function: x-make-font-bold FONT &optional DEVICE
  970.      Given an X font specification, this attempts to make a "bold" font.
  971.      If it fails, it returns `nil'.
  972.  
  973.  - Function: x-make-font-unbold FONT &optional DEVICE
  974.      Given an X font specification, this attempts to make a non-bold
  975.      font.  If it fails, it returns `nil'.
  976.  
  977.  - Function: x-make-font-italic FONT &optional DEVICE
  978.      Given an X font specification, this attempts to make an "italic"
  979.      font.  If it fails, it returns `nil'.
  980.  
  981.  - Function: x-make-font-unitalic FONT &optional DEVICE
  982.      Given an X font specification, this attempts to make a non-italic
  983.      font.  If it fails, it returns `nil'.
  984.  
  985.  - Function: x-make-font-bold-italic FONT &optional DEVICE
  986.      Given an X font specification, this attempts to make a
  987.      "bold-italic" font.  If it fails, it returns `nil'.
  988.  
  989. 
  990. File: lispref.info,  Node: Font Convenience Functions,  Prev: Font Instance Characteristics,  Up: Fonts
  991.  
  992. Font Convenience Functions
  993. --------------------------
  994.  
  995.  - Function: font-name FONT &optional DOMAIN
  996.      This function returns the name of the FONT in the specified
  997.      DOMAIN, if any.  FONT should be a font specifier object and DOMAIN
  998.      is normally a window and defaults to the selected window if
  999.      omitted.  This is equivalent to using `specifier-instance' and
  1000.      applying `font-instance-name' to the result.
  1001.  
  1002.  - Function: font-truename FONT &optional DOMAIN
  1003.      This function returns the truename of the FONT in the specified
  1004.      DOMAIN, if any.  FONT should be a font specifier object and DOMAIN
  1005.      is normally a window and defaults to the selected window if
  1006.      omitted.  This is equivalent to using `specifier-instance' and
  1007.      applying `font-instance-truename' to the result.
  1008.  
  1009.  - Function: font-properties FONT &optional DOMAIN
  1010.      This function returns the properties of the FONT in the specified
  1011.      DOMAIN, if any.  FONT should be a font specifier object and DOMAIN
  1012.      is normally a window and defaults to the selected window if
  1013.      omitted.  This is equivalent to using `specifier-instance' and
  1014.      applying `font-instance-properties' to the result.
  1015.  
  1016. 
  1017. File: lispref.info,  Node: Colors,  Prev: Fonts,  Up: Faces and Window-System Objects
  1018.  
  1019. Colors
  1020. ======
  1021.  
  1022. * Menu:
  1023.  
  1024. * Color Specifiers::        Specifying how a color will appear.
  1025. * Color Instances::        What a color specifier gets instanced as.
  1026. * Color Instance Properties::    Properties of color instances.
  1027. * Color Convenience Functions::    Convenience functions that automatically
  1028.                   instance and retrieve the properties
  1029.                   of a color specifier.
  1030.  
  1031. 
  1032. File: lispref.info,  Node: Color Specifiers,  Next: Color Instances,  Up: Colors
  1033.  
  1034. Color Specifiers
  1035. ----------------
  1036.  
  1037.  - Function: color-specifier-p OBJECT
  1038.      This function returns non-`nil' if OBJECT is a color specifier.
  1039.  
  1040. 
  1041. File: lispref.info,  Node: Color Instances,  Next: Color Instance Properties,  Prev: Color Specifiers,  Up: Colors
  1042.  
  1043. Color Instances
  1044. ---------------
  1045.  
  1046.    A "color-instance object" is an object describing the way a color
  1047. specifier is instanced in a particular domain.  Functions such as
  1048. `face-background-instance' return a color-instance object.  For example,
  1049.  
  1050.      (face-background-instance 'default (next-window))
  1051.          => #<color-instance moccasin 47=(FFFF,E4E4,B5B5) 0x678d>
  1052.  
  1053.    The color-instance object returned describes the way the background
  1054. color of the `default' face is displayed in the next window after the
  1055. selected one.
  1056.  
  1057.  - Function: color-instance-p OBJECT
  1058.      This function returns non-`nil' if OBJECT is a color-instance.
  1059.  
  1060. 
  1061. File: lispref.info,  Node: Color Instance Properties,  Next: Color Convenience Functions,  Prev: Color Instances,  Up: Colors
  1062.  
  1063. Color Instance Properties
  1064. -------------------------
  1065.  
  1066.  - Function: color-instance-name COLOR-INSTANCE
  1067.      This function returns the name used to allocate COLOR-INSTANCE.
  1068.  
  1069.  - Function: color-instance-rgb-components COLOR-INSTANCE
  1070.      This function returns a three element list containing the red,
  1071.      green, and blue color components of COLOR-INSTANCE.
  1072.  
  1073.           (color-instance-rgb-components
  1074.             (face-background-instance 'default (next-window)))
  1075.               => (65535 58596 46517)
  1076.  
  1077. 
  1078. File: lispref.info,  Node: Color Convenience Functions,  Prev: Color Instance Properties,  Up: Colors
  1079.  
  1080. Color Convenience Functions
  1081. ---------------------------
  1082.  
  1083.  - Function: color-name COLOR &optional DOMAIN
  1084.      This function returns the name of the COLOR in the specified
  1085.      DOMAIN, if any.  COLOR should be a color specifier object and
  1086.      DOMAIN is normally a window and defaults to the selected window if
  1087.      omitted.  This is equivalent to using `specifier-instance' and
  1088.      applying `color-instance-name' to the result.
  1089.  
  1090.  - Function: color-rgb-components COLOR &optional DOMAIN
  1091.      This function returns the RGB components of the COLOR in the
  1092.      specified DOMAIN, if any.  COLOR should be a color specifier
  1093.      object and DOMAIN is normally a window and defaults to the
  1094.      selected window if omitted.  This is equivalent to using
  1095.      `specifier-instance' and applying `color-instance-rgb-components'
  1096.      to the result.
  1097.  
  1098.           (color-rgb-components (face-background 'default (next-window)))
  1099.               => (65535 58596 46517)
  1100.  
  1101. 
  1102. File: lispref.info,  Node: Glyphs,  Next: Annotations,  Prev: Faces and Window-System Objects,  Up: Top
  1103.  
  1104. Glyphs
  1105. ******
  1106.  
  1107.    A "glyph" is an object that is used for pixmaps and non-textual
  1108. strings that are displayed in the text of a buffer, in the margins, or
  1109. in the toolbar.  The actual image that is displayed (as opposed to its
  1110. position or clipping) is defined by an "image specifier" object
  1111. contained within the glyph.
  1112.  
  1113.  - Function: glyphp OBJECT
  1114.      This function returns `t' if OBJECT is a glyph.
  1115.  
  1116. * Menu:
  1117.  
  1118. * Glyph Functions::    Functions for working with glyphs.
  1119. * Images::        Graphical images displayed in a frame.
  1120. * Cursors::        Controlling the mouse cursor.
  1121.  
  1122. 
  1123. File: lispref.info,  Node: Glyph Functions,  Next: Images,  Up: Glyphs
  1124.  
  1125. Glyph Functions
  1126. ===============
  1127.  
  1128. * Menu:
  1129.  
  1130. * Creating Glyphs::    Creating new glyphs.
  1131. * Glyph Properties::    Accessing and modifying a glyph's properties.
  1132. * Glyph Convenience Functions::
  1133.             Convenience functions for accessing particular
  1134.               properties of a glyph.
  1135.  
  1136. 
  1137. File: lispref.info,  Node: Creating Glyphs,  Next: Glyph Properties,  Up: Glyph Functions
  1138.  
  1139. Creating Glyphs
  1140. ---------------
  1141.  
  1142.  - Function: make-glyph &optional SPEC-LIST
  1143.      This function creates a new `glyph' object, with the given
  1144.      specification list used to initialize the glyph's image specifier.
  1145.      SPEC-LIST can be a list of specifications (each of which is a cons
  1146.      of a locale and a list of inst-pairs, each of which is a cons of a
  1147.      tag and an instantiator), a single instantiator, a list of
  1148.      instantiators, or almost any other reasonable form (specifically
  1149.      anything accepted by `canonicalize-spec-list').  *Note
  1150.      Specifiers:: for more information about specifiers.
  1151.  
  1152.  - Function: make-glyph-internal
  1153.      This function creates a new, uninitialzed glyph.
  1154.  
  1155.